Left Termination of the query pattern lessleaves_in_2(g, g) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

append(nil, Y, Y).
append(cons(U, V), Y, cons(U, Z)) :- append(V, Y, Z).
lessleaves(nil, cons(W, Z)).
lessleaves(cons(U, V), cons(W, Z)) :- ','(append(U, V, U1), ','(append(W, Z, W1), lessleaves(U1, W1))).

Queries:

lessleaves(g,g).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
lessleaves_in: (b,b)
append_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → APPEND_IN_GGA(U, V, U1)
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → U1_GGA(U, V, Y, Z, append_in_gga(V, Y, Z))
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → APPEND_IN_GGA(W, Z, W1)
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_GG(U, V, W, Z, lessleaves_in_gg(U1, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → APPEND_IN_GGA(U, V, U1)
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → U1_GGA(U, V, Y, Z, append_in_gga(V, Y, Z))
APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → APPEND_IN_GGA(W, Z, W1)
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_GG(U, V, W, Z, lessleaves_in_gg(U1, W1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
U1_GGA(x1, x2, x3, x4, x5)  =  U1_GGA(x1, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)
U4_GG(x1, x2, x3, x4, x5)  =  U4_GG(x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 4 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APPEND_IN_GGA(cons(U, V), Y, cons(U, Z)) → APPEND_IN_GGA(V, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
cons(x1, x2)  =  cons(x1, x2)
APPEND_IN_GGA(x1, x2, x3)  =  APPEND_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APPEND_IN_GGA(cons(U, V), Y) → APPEND_IN_GGA(V, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))

The TRS R consists of the following rules:

lessleaves_in_gg(nil, cons(W, Z)) → lessleaves_out_gg(nil, cons(W, Z))
lessleaves_in_gg(cons(U, V), cons(W, Z)) → U2_gg(U, V, W, Z, append_in_gga(U, V, U1))
append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))
U2_gg(U, V, W, Z, append_out_gga(U, V, U1)) → U3_gg(U, V, W, Z, U1, append_in_gga(W, Z, W1))
U3_gg(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → U4_gg(U, V, W, Z, lessleaves_in_gg(U1, W1))
U4_gg(U, V, W, Z, lessleaves_out_gg(U1, W1)) → lessleaves_out_gg(cons(U, V), cons(W, Z))

The argument filtering Pi contains the following mapping:
lessleaves_in_gg(x1, x2)  =  lessleaves_in_gg(x1, x2)
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
lessleaves_out_gg(x1, x2)  =  lessleaves_out_gg
U2_gg(x1, x2, x3, x4, x5)  =  U2_gg(x3, x4, x5)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_gg(x1, x2, x3, x4, x5, x6)  =  U3_gg(x5, x6)
U4_gg(x1, x2, x3, x4, x5)  =  U4_gg(x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(U, V, W, Z, append_in_gga(U, V, U1))
U3_GG(U, V, W, Z, U1, append_out_gga(W, Z, W1)) → LESSLEAVES_IN_GG(U1, W1)
U2_GG(U, V, W, Z, append_out_gga(U, V, U1)) → U3_GG(U, V, W, Z, U1, append_in_gga(W, Z, W1))

The TRS R consists of the following rules:

append_in_gga(nil, Y, Y) → append_out_gga(nil, Y, Y)
append_in_gga(cons(U, V), Y, cons(U, Z)) → U1_gga(U, V, Y, Z, append_in_gga(V, Y, Z))
U1_gga(U, V, Y, Z, append_out_gga(V, Y, Z)) → append_out_gga(cons(U, V), Y, cons(U, Z))

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
append_in_gga(x1, x2, x3)  =  append_in_gga(x1, x2)
append_out_gga(x1, x2, x3)  =  append_out_gga(x3)
U1_gga(x1, x2, x3, x4, x5)  =  U1_gga(x1, x5)
U3_GG(x1, x2, x3, x4, x5, x6)  =  U3_GG(x5, x6)
LESSLEAVES_IN_GG(x1, x2)  =  LESSLEAVES_IN_GG(x1, x2)
U2_GG(x1, x2, x3, x4, x5)  =  U2_GG(x3, x4, x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(W, Z, append_in_gga(U, V))
U3_GG(U1, append_out_gga(W1)) → LESSLEAVES_IN_GG(U1, W1)
U2_GG(W, Z, append_out_gga(U1)) → U3_GG(U1, append_in_gga(W, Z))

The TRS R consists of the following rules:

append_in_gga(nil, Y) → append_out_gga(Y)
append_in_gga(cons(U, V), Y) → U1_gga(U, append_in_gga(V, Y))
U1_gga(U, append_out_gga(Z)) → append_out_gga(cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

append_in_gga(nil, Y) → append_out_gga(Y)
Used ordering: POLO with Polynomial interpretation [25]:

POL(LESSLEAVES_IN_GG(x1, x2)) = x1 + x2   
POL(U1_gga(x1, x2)) = 2·x1 + x2   
POL(U2_GG(x1, x2, x3)) = x1 + x2 + x3   
POL(U3_GG(x1, x2)) = x1 + x2   
POL(append_in_gga(x1, x2)) = x1 + x2   
POL(append_out_gga(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(nil) = 0   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(W, Z, append_in_gga(U, V))
U3_GG(U1, append_out_gga(W1)) → LESSLEAVES_IN_GG(U1, W1)
U2_GG(W, Z, append_out_gga(U1)) → U3_GG(U1, append_in_gga(W, Z))

The TRS R consists of the following rules:

append_in_gga(cons(U, V), Y) → U1_gga(U, append_in_gga(V, Y))
U1_gga(U, append_out_gga(Z)) → append_out_gga(cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

LESSLEAVES_IN_GG(cons(U, V), cons(W, Z)) → U2_GG(W, Z, append_in_gga(U, V))
U2_GG(W, Z, append_out_gga(U1)) → U3_GG(U1, append_in_gga(W, Z))

Strictly oriented rules of the TRS R:

append_in_gga(cons(U, V), Y) → U1_gga(U, append_in_gga(V, Y))

Used ordering: POLO with Polynomial interpretation [25]:

POL(LESSLEAVES_IN_GG(x1, x2)) = 2·x1 + x2   
POL(U1_gga(x1, x2)) = 1 + 2·x1 + x2   
POL(U2_GG(x1, x2, x3)) = 2 + 2·x1 + x2 + 2·x3   
POL(U3_GG(x1, x2)) = 2·x1 + x2   
POL(append_in_gga(x1, x2)) = 2·x1 + x2   
POL(append_out_gga(x1)) = x1   
POL(cons(x1, x2)) = 1 + 2·x1 + x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
                          ↳ QDP
                            ↳ RuleRemovalProof
QDP
                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U3_GG(U1, append_out_gga(W1)) → LESSLEAVES_IN_GG(U1, W1)

The TRS R consists of the following rules:

U1_gga(U, append_out_gga(Z)) → append_out_gga(cons(U, Z))

The set Q consists of the following terms:

append_in_gga(x0, x1)
U1_gga(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.